Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 4 - Colors and Color-Related Objects / Colors and Color-Related Objects Reference
Color Profile Functions / Retrieving and Replacing Profile Information


GXGetColorProfile

You can use the GXGetColorProfile function to retrieve the profile data from a color profile object.

long GXGetColorProfile(gxColorProfile source, 
                        void *colorProfileData);
source
A reference to the color profile object to get the profile data from.
colorProfileData
A pointer to a buffer. On return, the buffer contains the profile data for the source color profile.
function result
The size in bytes of the source color profile's profile data.
DESCRIPTION
The GXGetColorProfile function returns the profile data from the source color profile in the buffer pointed to by the responses parameter. It also returns the size of the profile data as the function result.

The profile data returned by this function is a ColorSync color profile structure (type CMProfile).

If you specify nil for the colorProfileData parameter, this function does not return the profile data, but it nevertheless returns a correct value for the size of the profile response structure in the function result. Thus you can make an initial call to GXGetColorProfile to determine the size of buffer to allocate, and then call it once more to get the profile data itself.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
colorProfile_is_nil 
SEE ALSO
To replace the profile data in a color profile object, use the GXSetColorProfile function, described in the next section.

The format of the profile data in a color profile object is described in the section "Profile Data" beginning on page 4-36. The ColorSync Utilities, including the CMProfile data type, are described in Inside Macintosh: Advanced Color Imaging.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996